package com.xd.core.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author SJ
 * @since 2023-03-14
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "SysUser对象", description = "用户表")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "身份证")
    private String idCard;

    @ApiModelProperty(value = "身份证正面图片地址")
    private String idCardFrontUrl;

    @ApiModelProperty(value = "身份证反面图片地址")
    private String idCardReverseUrl;

    @ApiModelProperty(value = "归属公司id")
    private Integer companyId;

    @ApiModelProperty(value = "账号类型（0--主账号，1--子账号）")
    private String userType;

    @ApiModelProperty(value = "公司类型（1--平台，2--资管，3--代理，4--集团）")
    private String companyType;

    @ApiModelProperty(value = "账号状态（0正常1停用)")
    private String status;

    @ApiModelProperty(value = "是否分配(0正常，1禁用)")
    private String assignment;

    @ApiModelProperty(value = "登陆手机号")
    private String phone;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "创建人的用户id")
    private Integer createBy;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    private Integer updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @TableLogic
    @ApiModelProperty(value = "删除标志（O代表未删除，1代表已删除)")
    private String delFlag;

    @ApiModelProperty(value = "数据权限类型(1-个人，2-所属及下属部门，3-自定义部门,4-全部)")
    private String dataPertType;

    @ApiModelProperty(value = "数据部门ID集")
    private String dataGroup;

    @ApiModelProperty(value = "常登录地点")
    private String regularLoginCity;

    @ApiModelProperty(value = "登陆时间")
    private Date loginTime;

}
